package com.ktjy.aop;

import org.aspectj.lang.JoinPoint;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class LoggerAspect {
    private static final Logger log = LoggerFactory.getLogger(LoggerAspect.class);

    public void before(JoinPoint jp){
        log.info("【LoggerAspect 前置增强】 调用 {} 的{} 方法。返回值：{}",jp.getTarget(),
                jp.getSignature().getName());
    }

    public void afterReturning(JoinPoint jp,Object result){
        log.info("【LoggerAspect 前置增强】 调用 {} 的{} 方法。返回值：{}",jp.getTarget(),
                jp.getSignature().getName(),result);
    }
}
